package com.alex.maze.entities;

import com.alex.maze.Art;
import com.alex.maze.graphics.Sprite;

public class PushingEntity extends Entity
{
    // Okej za sada je sve ok dodaje samo pushing entity nadam se da malo kasnije i ne krene da dodaje player entity ---____---
    public PushingEntity(int x, int z)
    {
        this.x = x;
        this.z = z;
        sprites.add(new Sprite(0, 0, 0, 3, Art.getCol(0xAFA293)));
    }
    public void azuriraj()
    {
        move();
        xa *= 0.96;
        za *= 0.96;
    }
    
    public boolean use(Entity source)
    {
        System.err.println("source: " + source.toString());
        xa += Math.sin(source.rot) * 0.1 + source.xa;
        za += Math.cos(source.rot) * 0.1 + source.za;
        return true;
    }
}
